//
//  GRJTool.h
//  GRJTolCayFrwk
//
//  Created by apple on 2017/3/1.
//  Copyright © 2017年 Global Barter. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CommonCrypto/CommonDigest.h>


@interface GRJTool : NSObject
//十六进制颜色转化为UIColor
+ (UIColor *) colorWithHexString: (NSString *)color;

/*时间处理*/
//获取现在时间
+ (NSString *)getNowTime;
+ (NSString *)getNowTimeWithSecond;
//获取当前时间
+(NSString *)getCurrentTime;
//时间戳转换为时间
+ (NSString *)timestampToTime:(NSTimeInterval)timestamp;
+ (NSString *)timestampToMouthTime:(NSTimeInterval)timestamp;
//将时间转换为时间戳
+ (NSString *)XtimestampToTime:(NSTimeInterval)timestamp;
+ (NSTimeInterval)XtimeToTimestamp:(NSString *)timeStr;
+ (NSTimeInterval)timeToTimestamp:(NSString *)timeStr;
+(UIColor *)navBarBlueColor;

//删除document下的图片
+(void)deleteImageInSandBoxDocument;
// 一级标题(一)颜色
+(UIColor *)titleBlackColor;
// 一级标题(二)颜色
+(UIColor *)titleGrayColor;
//分割线的颜色
+(UIColor *)lineColor;
// 标题返回橙黄色
+(UIColor *)titleYellowColor;
//标题返回红色
+ (UIColor *)titleRedColor;
//标题返回蓝色
+ (UIColor *)titleBlueColor;
//判断对象是否为空
+(BOOL)objectIsEmpty:(id)object;
//若字符串为空，则默认将空字符串赋为@""
+(NSString *)convertString:(id)object;
//若字符串为空，则默认将空字符串赋为@"未加载数据"
+(NSString *)convertNULLString:(id)object;
//判断字典是否有某key值
+(BOOL)dicContainsKey:(NSMutableDictionary *)dic keyValue:(NSString *)key;
//背景底色 ----浅灰
+ (UIColor *)bgViewWhite;
/*内部蓝色字体*/
+(UIColor *)steelInnerBlueColor;
+(UIColor *)steelDarkGrayBlack;
/** 验证手机号码 */
+ (BOOL)validateMobile:(NSString *)mobileNum;
/** 验证是否为浮点型 */
+ (BOOL)isPureFloat:(NSString*)string;
/** 验证是否为整型 */
+ (BOOL)isPureInt:(NSString*)string;
/** 验证身份证号码 */
+ (BOOL)validateIdentificationFormat:(NSString *)identification;
/** 获取当前时间戳 */
+ (NSString *)getStrWithTime;
/** 判断某一个字符串中是否包含另一个字符串 */
+ (BOOL)isfirst:(NSString *)first includeSecond: (NSString *)second;
/** 计算字符个数 */
+(int)convertToInt:(NSString*)strtemp;
/** 计算文件夹下所有文件的大小 */
+(long)fileSizeForDir:(NSString*)path;
/** 处理图片大小 */
+ (UIImage *)scaleToSize:(UIImage *)img;
/** 判断是否为URL */
+ (BOOL)isUrl;
/** md5加密 */
+ (NSString *) md5:(NSString *) input;
+ (NSString *)stringByDecodingURLFormat ;
+ (NSString *)generateThePendingSignatureStringWithDict: (NSDictionary *)dict;
+ (NSString *)generateTheVerifyWithDict: (NSDictionary *)dict;

@end
